home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Complet / emovix / eMovix-0.9.0pre1_Setup.exe / {app} / keyboard-i18n / README
Encoding:
Text File  |  2003-04-26  |  3.3 KB  |  79 lines

  1. Creating keymaps for keyboard internationalization in *MoviX*
  2. =============================================================
  3.  
  4. Balßzs Bßrßny <balazs@tud.at>
  5.  
  6. Different languages and countries have different keyboard layouts for
  7. historical reasons and to support national-language characters that don't exist
  8. on US (= standard IBM PC) keyboards.
  9.  
  10. When a PC boots up, the IBM-PC keyboard layout is active. This means that, for
  11. example, a German user has to type "-" to get the "/" character, and "▀" for
  12. "-" etc. This is really hard for novice users who rightfully assume that a key
  13. press will produce the same symbol on the keyboard.
  14. For English users, this is a non-issue as their keyboard is already generating
  15. the right codes.
  16.  
  17. To fully support international keyboards, so-called keymaps are used. They
  18. define the assigment of keys (key codes, to be exact) to characters. For
  19. additional complexity, the boot loader can use a keymap but the Linux kernel
  20. will then load another, so for each keyboard, we need to define two keymaps:
  21. one for the boot loader (ISOLINUX) and one for the Unix shell.
  22.  
  23. The first keymap is loaded by ISOLINUX with the "kbdmap" parameter in
  24. isolinux.conf. The second one is loaded with the "loadkmap" utility of busybox
  25. after the basic Linux system was started.
  26.  
  27. Generating keymap files for *MoviX*
  28. ===================================
  29.  
  30. 1. ISOLINUX keymap
  31. ------------------
  32. Documentation: http://syslinux.zytor.com/faq.php#config
  33. You need the utility "keytab-lilo.pl" from the LILO source. 
  34. You can get LILO from http://www.ibiblio.org/pub/Linux/system/boot/lilo/ .
  35. Just call "/path/to/keytab-lilo.pl /path/to/keyboardfile > bootkey.map".
  36.  
  37. An example:
  38.  
  39. /usr/local/bin/keytab-lilo.pl /usr/share/keymaps/i386/qwertz/hu.kmap.gz > hu/bootkey.map
  40.  
  41. Output of this command: 
  42. Loading /usr/share/keymaps/i386/qwerty/us.kmap.gz
  43. Loading /usr/share/keymaps/i386/qwertz/hu.kmap.gz
  44.  
  45. In the hu/ subdirectory, there is now a bootkey.map file with 256 bytes. (The
  46. size could vary according to the keyboard's complexity.)
  47.  
  48. 2. Linux shell keymap
  49. ---------------------
  50. Documentation: http://www.8ung.at/spblinux/doc/loadkmap.html
  51. On the booted *MoviX* system, the loadkmap utility of the Busybox project is
  52. used. Keymaps for loadkmap can be generated on a Linux system using Busybox'
  53. "dumpkmap" utility.
  54. If you don't have it installed, you need to get the source of busybox
  55. and compile it with #define BB_DUMPKMAP in Config.h. (Just remove the //
  56. comment signs from the line.)
  57. dumpkmap reads the current keymap from the console. You need to be root to be
  58. able to load and dump keymaps. 
  59. If you are working under X Window, switch to a console e.g. with CTRL+ALT+F2
  60. and login there as root.
  61.  
  62. First, the new keymap is loaded, in the following example again for Hungarian.
  63. Then, dumpkmap is used for dumping it into hu/shellkey.map. One can then load 
  64. the "good" keymap again in order to be able to use the PC correctly. ;-)
  65.  
  66. Example (best entered on one line):
  67.  
  68. loadkeys hu; /usr/local/bin/dumpkmap > hu/shellkey.map; loadkeys de-latin1
  69.  
  70. Of course, you should switch to *your* keyboard layout instead of "de-latin1".
  71.  
  72. On my system, the generated keymap files are 2823 bytes each.
  73.  
  74. 3. TODO: Keymap for X (for MoviX2)
  75. ----------------------------------
  76. This is probably not more than copying the appropriate file from some XFree86
  77. directory to keyboard-i18n/<lang>/ but I haven't tested it because I don't use
  78. MoviX2.
  79.